package com.sky.service;

import com.sky.dto.OrdersPageQueryDTO;
import com.sky.dto.OrdersPaymentDTO;
import com.sky.dto.OrdersSubmitDTO;
import com.sky.entity.Orders;
import com.sky.result.PageResult;
import com.sky.vo.*;

public interface OrderService {

    //用户端操作
    //用户下单
    OrderSubmitVO submitOrder(OrdersSubmitDTO ordersSubmitDTO);

    /**
     * 订单支付
     * @param ordersPaymentDTO
     * @return
     */
    OrderPaymentVO payment(OrdersPaymentDTO ordersPaymentDTO) throws Exception;

    /**
     * 支付成功，修改订单状态
     * @param outTradeNo
     */
    void paySuccess(String outTradeNo);

    //查询订单详情
    OrderDetailVO getOrderDetailById(String id);

    //分页查询订单
    PageResult getHistoryOrder(OrdersPageQueryDTO ordersPageQueryDTO);

    //取消订单
    void cancelOrderById(String id);

    //再来一单
    void repetitionOrder(String id);


    //商家端操作
    //各个状态的订单数量统计
    OrderStatisticsVO getStatistics();

    //分页查询
    PageResult getPageOrder(OrdersPageQueryDTO ordersPageQueryDTO);

    //修改状态
    void updateStatus(Orders orders);

    void reminder(String id);
}
